#include <myheader.h>

/*Usage:实现需求，将一串数子以固有格式读入文件，并读出文件  */
int main(int argc, char *argv[])
{
    ARGC_CHECK(argc,2);
    int num ;
    int fd = open(argv[1],O_RDWR);
    ERROR_CHECK(fd,-1,"open");
    ssize_t read_count = read(fd,&num,4);//写入四字节进入文件
    ERROR_CHECK(read_count,-1,"write");
    int close_ret = close(fd);
    ERROR_CHECK(close_ret,-1,"close");
    printf("%d\n",num + 1);
   //打开文件 
    return 0;
}

